﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class ContactDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Contact> Contact_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Contact_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Contact_Insert(Contact contact)
        {
            context.Contact_Insert(contact.Name, contact.Company, contact.Address, contact.Tel, contact.Mail, contact.Detail, contact.Date, contact.Active);
        }

        public void Contact_Update(Contact contact)
        {
            context.Contact_Update(contact.CId, contact.Name, contact.Company, contact.Address, contact.Tel, contact.Mail, contact.Detail, contact.Date, contact.Active);
        }
    }
}
